<template>
  <div>组件的演示</div>
  <hr />
  <input type="text" v-model="info" />
  <br />
  <br />
  <CompOne message="测试属性" count="10" @show-info="showCompInfo">
    <div>默认插槽</div>
    <template #header>
      <div>指定名称的插槽</div>
    </template>
  </CompOne>
  <br />
  <!-- <comp-one :message="info"></comp-one> -->
</template>

<script setup>
import { ref } from 'vue'
import CompOne from '@/components/CompOne.vue'
import { ElMessageBox } from 'element-plus'

const info = ref('我是父组件的值')

const showCompInfo = info => {
  ElMessageBox.alert(info, '自定义事件')
}
</script>

<style scoped></style>
